<?php

declare(strict_types=1);

namespace ImiApp\ApiServer\Api\Model\Base;

use Imi\Config\Annotation\ConfigValue;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Entity;
use Imi\Model\Annotation\Table;
use ImiApp\ImiServer\AbstractModel as Model;

/**
 * 申请更换辅导员 基类.
 *
 * @Entity(camel=false, bean=true, incrUpdate=false)
 * @Table(name=@ConfigValue(name="@app.models.ImiApp\ApiServer\Api\Model\ChangeCoach.name", default="fa_change_coach"), usePrefix=false, id={"id"}, dbPoolName=@ConfigValue(name="@app.models.ImiApp\ApiServer\Api\Model\ChangeCoach.poolName"))
 * @DDL(sql="CREATE TABLE `fa_change_coach` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) DEFAULT NULL,
  `store_id` int(10) DEFAULT NULL,
  `time` int(10) unsigned DEFAULT NULL COMMENT '时间',
  `old_pid` int(10) DEFAULT NULL COMMENT '原辅导员',
  `status` enum('1','2','3') DEFAULT '1' COMMENT '状态:1=待审核,2=已同意,3=已拒绝',
  `new_pid` int(10) DEFAULT NULL COMMENT '新辅导员',
  `updatetime` int(10) unsigned DEFAULT NULL COMMENT '更新时间',
  `year` varchar(10) DEFAULT NULL COMMENT '年',
  `coachcommenttype_ids` varchar(255) DEFAULT NULL COMMENT '评论类型',
  `str` varchar(255) DEFAULT NULL COMMENT '评论文字',
  `level` int(3) DEFAULT NULL COMMENT '评分等级',
  `ps` varchar(2555) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='申请更换辅导员'", decode="")
 *
 * @property int|null $id 
 * @property int|null $userId 
 * @property int|null $storeId 
 * @property int|null $time 时间
 * @property int|null $oldPid 原辅导员
 * @property string|null $status 状态:1=待审核,2=已同意,3=已拒绝
 * @property int|null $newPid 新辅导员
 * @property int|null $updatetime 更新时间
 * @property string|null $year 年
 * @property string|null $coachcommenttypeIds 评论类型
 * @property string|null $str 评论文字
 * @property int|null $level 评分等级
 * @property string|null $ps 备注
 */
abstract class ChangeCoachBase extends Model
{
    /**
     * {@inheritdoc}
     */
    public const PRIMARY_KEY = 'id';

    /**
     * {@inheritdoc}
     */
    public const PRIMARY_KEYS = ["id"];

    /**
     * id.
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true, unsigned=true, virtual=false)
     * @var int|null
     */
    protected ?int $id = NULL;

    /**
     * 获取 id.
     *
     * @return int|null
     */
    public function getId(): ?int
    {
        return $this->id;
    }

    /**
     * 赋值 id.
     * @param int|null $id id
     * @return static
     */
    public function setId($id)
    {
        $this->id = null === $id ? null : (int)$id;
        return $this;
    }

    /**
     * user_id.
     * @Column(name="user_id", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $userId = NULL;

    /**
     * 获取 userId.
     *
     * @return int|null
     */
    public function getUserId(): ?int
    {
        return $this->userId;
    }

    /**
     * 赋值 userId.
     * @param int|null $userId user_id
     * @return static
     */
    public function setUserId($userId)
    {
        $this->userId = null === $userId ? null : (int)$userId;
        return $this;
    }

    /**
     * store_id.
     * @Column(name="store_id", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $storeId = NULL;

    /**
     * 获取 storeId.
     *
     * @return int|null
     */
    public function getStoreId(): ?int
    {
        return $this->storeId;
    }

    /**
     * 赋值 storeId.
     * @param int|null $storeId store_id
     * @return static
     */
    public function setStoreId($storeId)
    {
        $this->storeId = null === $storeId ? null : (int)$storeId;
        return $this;
    }

    /**
     * 时间.
     * time
     * @Column(name="time", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=true, virtual=false)
     * @var int|null
     */
    protected ?int $time = NULL;

    /**
     * 获取 time - 时间.
     *
     * @return int|null
     */
    public function getTime(): ?int
    {
        return $this->time;
    }

    /**
     * 赋值 time - 时间.
     * @param int|null $time time
     * @return static
     */
    public function setTime($time)
    {
        $this->time = null === $time ? null : (int)$time;
        return $this;
    }

    /**
     * 原辅导员.
     * old_pid
     * @Column(name="old_pid", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $oldPid = NULL;

    /**
     * 获取 oldPid - 原辅导员.
     *
     * @return int|null
     */
    public function getOldPid(): ?int
    {
        return $this->oldPid;
    }

    /**
     * 赋值 oldPid - 原辅导员.
     * @param int|null $oldPid old_pid
     * @return static
     */
    public function setOldPid($oldPid)
    {
        $this->oldPid = null === $oldPid ? null : (int)$oldPid;
        return $this;
    }

    /**
     * 状态:1=待审核,2=已同意,3=已拒绝.
     * status
     * @Column(name="status", type="enum", length=0, accuracy=0, nullable=true, default="1", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $status = '1';

    /**
     * 获取 status - 状态:1=待审核,2=已同意,3=已拒绝.
     *
     * @return string|null
     */
    public function getStatus(): ?string
    {
        return $this->status;
    }

    /**
     * 赋值 status - 状态:1=待审核,2=已同意,3=已拒绝.
     * @param string|null $status status
     * @return static
     */
    public function setStatus($status)
    {
        $this->status = null === $status ? null : (string)$status;
        return $this;
    }

    /**
     * 新辅导员.
     * new_pid
     * @Column(name="new_pid", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $newPid = NULL;

    /**
     * 获取 newPid - 新辅导员.
     *
     * @return int|null
     */
    public function getNewPid(): ?int
    {
        return $this->newPid;
    }

    /**
     * 赋值 newPid - 新辅导员.
     * @param int|null $newPid new_pid
     * @return static
     */
    public function setNewPid($newPid)
    {
        $this->newPid = null === $newPid ? null : (int)$newPid;
        return $this;
    }

    /**
     * 更新时间.
     * updatetime
     * @Column(name="updatetime", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=true, virtual=false)
     * @var int|null
     */
    protected ?int $updatetime = NULL;

    /**
     * 获取 updatetime - 更新时间.
     *
     * @return int|null
     */
    public function getUpdatetime(): ?int
    {
        return $this->updatetime;
    }

    /**
     * 赋值 updatetime - 更新时间.
     * @param int|null $updatetime updatetime
     * @return static
     */
    public function setUpdatetime($updatetime)
    {
        $this->updatetime = null === $updatetime ? null : (int)$updatetime;
        return $this;
    }

    /**
     * 年.
     * year
     * @Column(name="year", type="varchar", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $year = NULL;

    /**
     * 获取 year - 年.
     *
     * @return string|null
     */
    public function getYear(): ?string
    {
        return $this->year;
    }

    /**
     * 赋值 year - 年.
     * @param string|null $year year
     * @return static
     */
    public function setYear($year)
    {
        $this->year = null === $year ? null : (string)$year;
        return $this;
    }

    /**
     * 评论类型.
     * coachcommenttype_ids
     * @Column(name="coachcommenttype_ids", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $coachcommenttypeIds = NULL;

    /**
     * 获取 coachcommenttypeIds - 评论类型.
     *
     * @return string|null
     */
    public function getCoachcommenttypeIds(): ?string
    {
        return $this->coachcommenttypeIds;
    }

    /**
     * 赋值 coachcommenttypeIds - 评论类型.
     * @param string|null $coachcommenttypeIds coachcommenttype_ids
     * @return static
     */
    public function setCoachcommenttypeIds($coachcommenttypeIds)
    {
        $this->coachcommenttypeIds = null === $coachcommenttypeIds ? null : (string)$coachcommenttypeIds;
        return $this;
    }

    /**
     * 评论文字.
     * str
     * @Column(name="str", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $str = NULL;

    /**
     * 获取 str - 评论文字.
     *
     * @return string|null
     */
    public function getStr(): ?string
    {
        return $this->str;
    }

    /**
     * 赋值 str - 评论文字.
     * @param string|null $str str
     * @return static
     */
    public function setStr($str)
    {
        $this->str = null === $str ? null : (string)$str;
        return $this;
    }

    /**
     * 评分等级.
     * level
     * @Column(name="level", type="int", length=3, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var int|null
     */
    protected ?int $level = NULL;

    /**
     * 获取 level - 评分等级.
     *
     * @return int|null
     */
    public function getLevel(): ?int
    {
        return $this->level;
    }

    /**
     * 赋值 level - 评分等级.
     * @param int|null $level level
     * @return static
     */
    public function setLevel($level)
    {
        $this->level = null === $level ? null : (int)$level;
        return $this;
    }

    /**
     * 备注.
     * ps
     * @Column(name="ps", type="varchar", length=2555, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $ps = NULL;

    /**
     * 获取 ps - 备注.
     *
     * @return string|null
     */
    public function getPs(): ?string
    {
        return $this->ps;
    }

    /**
     * 赋值 ps - 备注.
     * @param string|null $ps ps
     * @return static
     */
    public function setPs($ps)
    {
        $this->ps = null === $ps ? null : (string)$ps;
        return $this;
    }

}
